package com.jiesen.base.modules.login.department.mapper;

import com.jiesen.base.baseDao.BaseMapper;
import com.jiesen.base.modules.login.department.model.Department;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;

@Mapper
public interface DepartmentDao extends BaseMapper<Department> {

    @Insert("insert into `sys_user_department` ( `user_id` , `department_id` ) values ( #{uid} , #{did} )")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    public int insertDepartmentUser(@Param("uid") Serializable uid, @Param("did")Serializable did);

}
